package com.zjm.find.service.impl;

import com.zjm.find.dao.NewsMapper;
import com.zjm.find.pojo.News;
import com.zjm.find.service.ManageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ManageServiceImpl implements ManageService {

    @Autowired
    private NewsMapper newsMapper;

    @Override
    public List selectNews(News news) {
        return newsMapper.selectNews(news);
    }

    @Override
    public int postNews(News news) {
        return newsMapper.postNews(news);
    }

    @Override
    public boolean updateNews(News news) {
        return newsMapper.updateNews(news) == 1 ? true : false;
    }
}
